class AlertView extends eui.Component {

	private className: string;
	private closeBtn: egret.DisplayObject;

	public constructor(className: string) {
		super();
		this.className = className;
		this.skinName = `resource/eui_skins/alert/${className}Skin.exml`;
	}

	protected createChildren(): void {
		super.createChildren();
		this.initView();
		this.initEvent();
	}

	private initView(): void {
		
	}

	private initEvent(): void {
		if(!this.closeBtn) return;
		this.closeBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.closeBtnHandle, this);
	}

	private closeBtnHandle(e:egret.TouchEvent):void
	{
		e.stopPropagation();
		pub.SignalManager.instance.dispatchSignal(pub.SignalDefin.CLOSE_ALERT);
		this.closeBtn.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.closeBtnHandle, this);
	}

}